#ifndef YB_LED_H
#define YB_LED_H
#include <QtGui>
#include <QByteArray>
#include <stdio.h>
#include <stdlib.h>
#include "crc.h"

//device type
typedef enum DeviceType_t
{
    BX_5K1=0x51,
    BX_5K2=0x58,
    BX_5MK2=0x53,
    BX_7MK1=0x54

}DeviceType_t;
//display mode
typedef enum DisplayMode_t
{
    STATIC_MODE=0x01,
    FAST_MODE=0x02,
    LEFT_MODE=0x03,
    RIGHT_MODE=0x04,
    UP_MODE=0x05,
    DOWN_MODE=0x06
}DisplayMode_t;
//display date
typedef struct displayData_t
{
    QString audioStr;
    QString DispelayStr[4];
}displayData_t;
void yb_led_syncTime(QByteArray *resBuf);
void yb_led_create_park(unsigned char line,DeviceType_t DeviceType,QString info,QByteArray *resBuf);
#endif // YB_LED_H

/*
    //同步时间
    QByteArray buf;
    yb_led_syncTime(&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    //无车显示数据
    QByteArray buf;
    yb_led_create_park(1,LEFT_MODE,BX_5K1,"车牌识别  一车一杆  减速慢行",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    yb_led_create_park(2,STATIC_MODE,BX_5K1,"\\DL月\\DD日",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    yb_led_create_park(3,STATIC_MODE,BX_5K1,"\\DH时\\DM分",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    yb_led_create_park(4,STATIC_MODE,BX_5K1," 星期\\DW",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
 */

/*
    //无车显示数据
    QByteArray buf;
    yb_led_create_park(1,LEFT_MODE,BX_5K1,"车牌识别  一车一杆  减速慢行",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    yb_led_create_park(2,STATIC_MODE,BX_5K1,"出入平安",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    yb_led_create_park(3,STATIC_MODE,BX_5K1,"\\DY-\\DL-\\DD",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
    usleep(150000);
    buf.clear();
    yb_led_create_park(4,LEFT_MODE,BX_5K1,"请交费：10元",&buf);
    ::write(ctrl_com,buf.data(),buf.length());
 */

